package online.heycm.excel.excel;

import online.heycm.excel.dto.UserExcelDTO;
import online.heycm.excel.repository.entity.UserProfile;

/**
 * @author hey
 * @version 1.0
 * @since 2024/8/18 14:48
 */
public class UserExcelHandler extends ExcelHandler<UserProfile, UserExcelDTO> {

    public UserExcelHandler(String fileName) {
        super(fileName);
    }

    @Override
    public UserExcelDTO handleResult(UserProfile userProfile) {
        // 加解密、脱敏、转换、其他...
        UserExcelDTO dto = new UserExcelDTO();
        dto.setId(userProfile.getId());
        dto.setUserName(userProfile.getUserName());
        dto.setPhoneId(userProfile.getPhoneId());
        dto.setAvatar(userProfile.getAvatar());
        dto.setNickName(userProfile.getNickName());
        dto.setCreateTime(userProfile.getCreateTime());
        return dto;
    }
}
